<template>
  <view class="container">
    <!-- 成功提示 -->
    <view class="success-content">
      <view class="success-icon">✓</view>
      <text class="success-title">添加成功</text>
      <text class="success-message">车辆信息已成功添加</text>
      
      <!-- 返回按钮 -->
      <view class="back-btn" @click="goBack">
        <text>返回</text>
      </view>
    </view>
  </view>
</template>

<script setup>
// 返回车辆列表
const goBack = () => {
  uni.navigateBack({
    delta: 2 // 返回到车辆列表页面
  })
}

// 页面加载时显示成功动画
onMounted(() => {
  // 可以添加一些成功动画效果
})
</script>

<style>
.container {
  width: 100%;
  height: 100vh;
  background-color: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
}

.success-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background-color: #fff;
  padding: 40px 30px;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  width: 80%;
  max-width: 300px;
}

.success-icon {
  width: 80px;
  height: 80px;
  background-color: #4CD964;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  color: #fff;
  margin-bottom: 20px;
}

.success-title {
  font-size: 20px;
  font-weight: 600;
  color: #333;
  margin-bottom: 10px;
}

.success-message {
  font-size: 16px;
  color: #666;
  margin-bottom: 30px;
}

.back-btn {
  background-color: #007AFF;
  color: #fff;
  border-radius: 25px;
  padding: 12px 40px;
  font-size: 16px;
  font-weight: 500;
  width: 80%;
  text-align: center;
}
</style>